package com.yonyou.cyxdms.sysAuth.service.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.yonyou.cyx.framework.bean.dto.base.BaseDTO;
import com.yonyou.cyx.function.utils.bean.BeanMapperUtil;
import com.yonyou.cyxdms.framework.bean.entity.base.DMSBasePO;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 经销商基本信息
 * </p>
 *
 * @author quankk
 * @since 2019-08-26
 */
@TableName("tm_dealer_info")
public class DealerInfoPO extends DMSBasePO<DealerInfoPO> {

    private static final long serialVersionUID = 1L;

    /**
     * dealerInfoPO
     */
    @TableId(value = "DEALER_ID", type = IdType.AUTO)
    private Integer dealerId;
    /**
     * 所属公司
     */
    @TableField("COMPANY_ID")
    private Integer companyId;
    /**
     * 所属集团
     */
    @TableField("GROUP_COMPANY_ID")
    private Integer groupCompanyId;
    /**
     * 所属工厂公司
     */
    @TableField("FACTORY_COMPANY_ID")
    private Integer factoryCompanyId;
    /**
     * 组织ID
     */
    @TableField("ORG_ID")
    private Integer orgId;
    /**
     * 组织类型，固定为经销商类型
     */
    @TableField("ORG_TYPE")
    private Integer orgType;

    @TableField("APP_ID")
    private String appId;

    /**
     * 所有者代码
     */
    @TableField("DEALER_CODE")
    private String dealerCode;
    /**
     * 经销商名称
     */
    @TableField("DEALER_NAME")
    private String dealerName;
    /**
     * 经销商简称
     */
    @TableField("DEALER_SHORTNAME")
    private String dealerShortname;
    /**
     * DCS来源日期
     */
    @TableField("SOURCE_CHANGED_AT")
    private LocalDateTime sourceChangedAt;
    /**
     * 详细地址
     */
    @TableField("ADDRESS")
    private String address;
    /**
     * 省
     */
    @TableField("PROVINCE_ID")
    private Integer provinceId;
    /**
     * 市
     */
    @TableField("CITY_ID")
    private Integer cityId;
    /**
     * 县
     */
    @TableField("COUNTY_ID")
    private Integer countyId;
    /**
     * 有效状态
     */
    @TableField("VALID_STATUS")
    private Integer validStatus;
    /**
     * 所有者的父组织代码（用于二网使用）
     */
    @TableField("OWNER_PAR_CODE")
    private String ownerParCode;
    /**
     * 联系电话
     */
    @TableField("PHONE")
    private String phone;
    /**
     * 是否授权
     */
    @TableField("IS_AUZ")
    private Integer isAuz;
    /**
     * 税号
     */
    @TableField("TAX_NO")
    private String taxNo;
    /**
     * 传真号码
     */
    @TableField("FAX_NO")
    private String faxNo;
    /**
     * 联系人
     */
    @TableField("LINK_MAN")
    private String linkMan;
    /**
     * 邮编
     */
    @TableField("ZIP_CODE")
    private String zipCode;
    /**
     * 状态，有效无效
     */
    @TableField("STATUS")
    private Integer status;
    /**
     * 经销商类型：普通、军品、批售、改装、3S
     */
    @TableField("AG_TYPE")
    private Integer agType;
    /**
     * 销售区域
     */
    @TableField("SALE_AREA")
    private String saleArea;
    /**
     * 价格组
     */
    @TableField("PRICE_GROUP")
    private Integer priceGroup;
    /**
     * 付款条件
     */
    @TableField("PAY_COND")
    private Integer payCond;
    /**
     * 库存标准设定
     */
    @TableField("STOCK_SET")
    private String stockSet;
    /**
     * 业务邮箱
     */
    @TableField("EMAIL")
    private String email;
    /**
     * 经度
     */
    @TableField("LATITUDE")
    private String latitude;
    /**
     * 维度
     */
    @TableField("LONGITUDE")
    private String longitude;
    /**
     * 网点类型
     */
    @TableField("DOT_TYPE")
    private Integer dotType;
    /**
     * 分销商级别
     */
    @TableField("DISTRIBUTOR_LEVEL")
    private Integer distributorLevel;
    /**
     * 认证大客户代码
     */
    @TableField("AUTH_CUST_CODE")
    private String authCustCode;
    @TableField("CREDIT_TYPE")
    private Integer creditType;
    /**
     * 经销商营业状态
     */
    @TableField("BUSINESS_STATUS")
    private Integer businessStatus;
    /**
     * 维修站ID
     */
    @TableField("ASC_ID")
    private Long ascId;
    @TableField("BUSINESS_BEGIN_HOURS")
    private String businessBeginHours;
    @TableField("BUSINESS_END_HOURS")
    private String businessEndHours;
    @TableField("DEALER_PICTURE")
    private String dealerPicture;
    /**
     * 维修站代码
     */
    @TableField("ASC_CODE")
    private String ascCode;
    @TableField("IS_DELETED")
    @Version
    @TableLogic
    private Integer isDeleted;

    public String getBusinessBeginHours() {
        return businessBeginHours;
    }

    public void setBusinessBeginHours(String businessBeginHours) {
        this.businessBeginHours = businessBeginHours;
    }

    public String getBusinessEndHours() {
        return businessEndHours;
    }

    public void setBusinessEndHours(String businessEndHours) {
        this.businessEndHours = businessEndHours;
    }

    public String getDealerPicture() {
        return dealerPicture;
    }

    public void setDealerPicture(String dealerPicture) {
        this.dealerPicture = dealerPicture;
    }

    public DealerInfoPO() {
        super();
    }


    public Integer getDealerId() {
        return dealerId;
    }

    public void setDealerId(Integer dealerId) {
        this.dealerId = dealerId;
    }

    public Integer getCompanyId() {
        return companyId;
    }

    public void setCompanyId(Integer companyId) {
        this.companyId = companyId;
    }

    public Integer getGroupCompanyId() {
        return groupCompanyId;
    }

    public void setGroupCompanyId(Integer groupCompanyId) {
        this.groupCompanyId = groupCompanyId;
    }

    public Integer getFactoryCompanyId() {
        return factoryCompanyId;
    }

    public void setFactoryCompanyId(Integer factoryCompanyId) {
        this.factoryCompanyId = factoryCompanyId;
    }

    public Integer getOrgId() {
        return orgId;
    }

    public void setOrgId(Integer orgId) {
        this.orgId = orgId;
    }

    public Integer getOrgType() {
        return orgType;
    }

    public void setOrgType(Integer orgType) {
        this.orgType = orgType;
    }

    public String getDealerCode() {
        return dealerCode;
    }

    public void setDealerCode(String dealerCode) {
        this.dealerCode = dealerCode;
    }

    public String getDealerName() {
        return dealerName;
    }

    public void setDealerName(String dealerName) {
        this.dealerName = dealerName;
    }

    public String getDealerShortname() {
        return dealerShortname;
    }

    public void setDealerShortname(String dealerShortname) {
        this.dealerShortname = dealerShortname;
    }

    public LocalDateTime getSourceChangedAt() {
        return sourceChangedAt;
    }

    public void setSourceChangedAt(LocalDateTime sourceChangedAt) {
        this.sourceChangedAt = sourceChangedAt;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public Integer getProvinceId() {
        return provinceId;
    }

    public void setProvinceId(Integer provinceId) {
        this.provinceId = provinceId;
    }

    public Integer getCityId() {
        return cityId;
    }

    public void setCityId(Integer cityId) {
        this.cityId = cityId;
    }

    public Integer getCountyId() {
        return countyId;
    }

    public void setCountyId(Integer countyId) {
        this.countyId = countyId;
    }

    public Integer getValidStatus() {
        return validStatus;
    }

    public void setValidStatus(Integer validStatus) {
        this.validStatus = validStatus;
    }

    public String getOwnerParCode() {
        return ownerParCode;
    }

    public void setOwnerParCode(String ownerParCode) {
        this.ownerParCode = ownerParCode;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public Integer getIsAuz() {
        return isAuz;
    }

    public void setIsAuz(Integer isAuz) {
        this.isAuz = isAuz;
    }

    public String getTaxNo() {
        return taxNo;
    }

    public void setTaxNo(String taxNo) {
        this.taxNo = taxNo;
    }

    public String getFaxNo() {
        return faxNo;
    }

    public void setFaxNo(String faxNo) {
        this.faxNo = faxNo;
    }

    public String getLinkMan() {
        return linkMan;
    }

    public void setLinkMan(String linkMan) {
        this.linkMan = linkMan;
    }

    public String getZipCode() {
        return zipCode;
    }

    public void setZipCode(String zipCode) {
        this.zipCode = zipCode;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Integer getAgType() {
        return agType;
    }

    public void setAgType(Integer agType) {
        this.agType = agType;
    }

    public String getSaleArea() {
        return saleArea;
    }

    public void setSaleArea(String saleArea) {
        this.saleArea = saleArea;
    }

    public Integer getPriceGroup() {
        return priceGroup;
    }

    public void setPriceGroup(Integer priceGroup) {
        this.priceGroup = priceGroup;
    }

    public Integer getPayCond() {
        return payCond;
    }

    public void setPayCond(Integer payCond) {
        this.payCond = payCond;
    }

    public String getStockSet() {
        return stockSet;
    }

    public void setStockSet(String stockSet) {
        this.stockSet = stockSet;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getLatitude() {
        return latitude;
    }

    public void setLatitude(String latitude) {
        this.latitude = latitude;
    }

    public String getLongitude() {
        return longitude;
    }

    public void setLongitude(String longitude) {
        this.longitude = longitude;
    }

    public Integer getDotType() {
        return dotType;
    }

    public void setDotType(Integer dotType) {
        this.dotType = dotType;
    }

    public Integer getDistributorLevel() {
        return distributorLevel;
    }

    public void setDistributorLevel(Integer distributorLevel) {
        this.distributorLevel = distributorLevel;
    }

    public String getAuthCustCode() {
        return authCustCode;
    }

    public void setAuthCustCode(String authCustCode) {
        this.authCustCode = authCustCode;
    }

    public Integer getCreditType() {
        return creditType;
    }

    public void setCreditType(Integer creditType) {
        this.creditType = creditType;
    }

    public Integer getBusinessStatus() {
        return businessStatus;
    }

    public void setBusinessStatus(Integer businessStatus) {
        this.businessStatus = businessStatus;
    }

    public Long getAscId() {
        return ascId;
    }

    public void setAscId(Long ascId) {
        this.ascId = ascId;
    }

    public String getAscCode() {
        return ascCode;
    }

    public void setAscCode(String ascCode) {
        this.ascCode = ascCode;
    }

    @Override
    public Integer getIsDeleted() {
        return isDeleted;
    }

    @Override
    public void setIsDeleted(Integer isDeleted) {
        this.isDeleted = isDeleted;
    }

    public String getAppId() {
        return appId;
    }

    public void setAppId(String appId) {
        this.appId = appId;
    }

    @Override
    protected Serializable pkVal() {
        return this.dealerId;
    }

    @Override
    public String toString() {
        return "DealerInfoPO{" +
                "dealerId=" + dealerId +
                ", companyId=" + companyId +
                ", groupCompanyId=" + groupCompanyId +
                ", factoryCompanyId=" + factoryCompanyId +
                ", orgId=" + orgId +
                ", orgType=" + orgType +
                ", appId='" + appId + '\'' +
                ", dealerCode='" + dealerCode + '\'' +
                ", dealerName='" + dealerName + '\'' +
                ", dealerShortname='" + dealerShortname + '\'' +
                ", sourceChangedAt=" + sourceChangedAt +
                ", address='" + address + '\'' +
                ", provinceId=" + provinceId +
                ", cityId=" + cityId +
                ", countyId=" + countyId +
                ", validStatus=" + validStatus +
                ", ownerParCode='" + ownerParCode + '\'' +
                ", phone='" + phone + '\'' +
                ", isAuz=" + isAuz +
                ", taxNo='" + taxNo + '\'' +
                ", faxNo='" + faxNo + '\'' +
                ", linkMan='" + linkMan + '\'' +
                ", zipCode='" + zipCode + '\'' +
                ", status=" + status +
                ", agType=" + agType +
                ", saleArea='" + saleArea + '\'' +
                ", priceGroup=" + priceGroup +
                ", payCond=" + payCond +
                ", stockSet='" + stockSet + '\'' +
                ", email='" + email + '\'' +
                ", latitude='" + latitude + '\'' +
                ", longitude='" + longitude + '\'' +
                ", dotType=" + dotType +
                ", distributorLevel=" + distributorLevel +
                ", authCustCode='" + authCustCode + '\'' +
                ", creditType=" + creditType +
                ", businessStatus=" + businessStatus +
                ", ascId=" + ascId +
                ", businessBeginHours='" + businessBeginHours + '\'' +
                ", businessEndHours='" + businessEndHours + '\'' +
                ", dealerPicture='" + dealerPicture + '\'' +
                ", ascCode='" + ascCode + '\'' +
                ", isDeleted=" + isDeleted +
                '}';
    }

    /**
     * 将PO 信息转化为DTO
     *
     * @param dto 需要进行转换的dto
     * @author quankk
     * @since 2018/7/22 0022
     */
    protected <T extends BaseDTO> void transDtoToPo(T dto) {
        BeanMapperUtil.copyProperties(this, dto, "dealerId");
    }


}
